1. Field of the Invention
The present invention relates to a microcomputer capable of measuring a time it takes to carry out processing to initialize a flash memory.
2. Description of the Prior Art
FIG. 7 is a diagram showing the configuration of a conventional microcomputer shown for example on page 4-4 of a memory ROM chapter of a `94 Mitsubishi Semiconductor Data Book` published by Mitsubishi Electric Corporation in January 1994. Reference numerals 1 and 2 shown in the figure are a microcomputer and a flash-memory unit embedded in the microcomputer 1 respectively. Reference numeral 3 denotes a timer for outputting a clock signal having a predetermined frequency which is obtained by dividing the frequency of a system clock. Reference numeral 4 is a CPU which operates in synchronization with the clock signal generated by the timer 3. The CPU 4 outputs an initialization instruction when it receives an erase signal requesting processing to initialize the flash memory unit 2. Reference numeral 5 is a memory control unit which is used for executing the processing to initialize the flash memory unit 2 when an initialization instruction is received from the CPU 4. While the processing to initialize the flash memory unit 2 is being carried out from its start to an end thereof, the memory control unit 5 outputs a busy signal for indicating that the initialization is under way. Reference numeral 6 is a timer embedded in the memory control unit 5 for outputting a pulse signal while the busy signal output by the memory control unit 5 is active. Reference numeral 7 is a measurement apparatus for measuring the time it takes to carry out the processing to initialize the flash memory unit 2 by counting the number of pulses in the pulse signal generated by the embedded timer 6.
First of all, when an erase signal is received by the CPU 4 typically by way of an external input pin of the microcomputer 1, the CPU 4 outputs an initialization instruction to the memory control unit 5, requesting the memory control unit 5 to execute processing to initialize the flash memory unit 2.
Receiving the initialization instruction from the CPU 4, the memory control unit 5 executes the processing to initialize the flash memory unit 2. The time it takes to carry out the processing to initialize the flash memory unit 2 is measured as an item of evaluation of the flash memory unit 2. As described above, while the processing to initialize the flash memory unit 2 is being carried out from its start to an end thereof, the memory control unit 5 outputs a busy signal for indicating that the initialization is under way.
In addition, the timer 6 embedded in the memory control unit 5 outputs a pulse signal while the busy signal output by the memory control unit 5 is active.
In the mean time, the measurement apparatus 7 connected to an external pin of the microcomputer 1 measures the time it takes to carry out the processing to initialize the flash memory unit 2 by counting the number of pulses in the pulse signal generated by the embedded timer 6.
Having a configuration described above, the conventional microcomputer 1 allows the time it takes to carry out processing to initialize the memory flash unit 2 embedded therein to be measured. However, it is necessary to prepare the dedicated measurement apparatus 7, giving rise to a problem that the flash memory unit 2 can not be evaluated with ease.
Moreover, in addition to the timer 3, it is also necessary to provide separately the embedded timer 6 for outputting a pulse signal with a predetermined frequency, raising another problem that the configuration of the circuit becomes complex.
It should be noted that, in place of the embedded timer 6, a technology of utilizing a system clock is disclosed in JP-A No. Hei 2-9090. Even if this technology allows the embedded timer 6 to be eliminated, the dedicated measurement apparatus 7 is still required. In addition, the frequency of the system clock is very high, giving rise to a still further problem that it is necessary to provide the measurement apparatus 7 with a counting circuit that is capable of counting the number of clock pulses in the system clock at a high speed.